package com.yxw.live_vod_boot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author xiexuxin
 * @date 2023-12-06
 */
@Data
@TableName("yx_order")
@ApiModel("订单实体类")
public class YxOrderEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "order_id",type = IdType.ASSIGN_ID)
    @ApiModelProperty("订单Id")
    private Long orderId;

    @TableField("order_num")
    @ApiModelProperty("订单号")
    private String orderNum;

    @TableField("shop_id")
    @ApiModelProperty("店铺Id")
    private Long shopId;

    @TableField("shop_name")
    @ApiModelProperty("店铺名称")
    private String shopName;

    @TableField("user_id")
    @ApiModelProperty("用户ID")
    private Long userId;

    @TableField("user_name")
    @ApiModelProperty("用户名称")
    private String userName;

    @TableField("user_phone")
    @ApiModelProperty("用户手机号")
    private String userPhone;

    @TableField("order_status")
    @ApiModelProperty("订单状态 0:待支付 1:待使用/核销 2:订单取消 3:订单完成 4:退款成功")
    private Integer orderStatus;

    @TableField("buss_id")
    @ApiModelProperty("直播/点播Id")
    private String bussId;

    @TableField("product_amount")
    @ApiModelProperty("商品订单价")
    private BigDecimal productAmount;

    @TableField("actual_amount")
    @ApiModelProperty("实际支付")
    private BigDecimal actualAmount;

    @TableField("payment_way")
    @ApiModelProperty("支付方式")
    private String paymentWay;

    @TableField("order_time")
    @ApiModelProperty("下单时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderTime;

    @TableField("completion_time")
    @ApiModelProperty("完成时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date completionTime;

    @TableField("refund_time")
    @ApiModelProperty("退款时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date refundTime;

    @TableField("refund_reason")
    @ApiModelProperty("退款原因")
    private String refundReason;

    @TableField("refund_quantity")
    @ApiModelProperty("退款数量")
    private Integer refundQuantity;

    @TableField("refund_amount")
    @ApiModelProperty("退款金额")
    private BigDecimal refundAmount;

    @TableField("refund_type")
    @ApiModelProperty("退款方式")
    private String refundType;

    @TableField("order_source")
    @ApiModelProperty("订单来源 0:直播间 1:点播 2:橱窗")
    private Integer orderSource;

    @TableField("product_id")
    @ApiModelProperty("商品ID")
    private Long productId;

    @TableField("product_pic")
    @ApiModelProperty("商品图片")
    private String productPic;

    @TableField("product_name")
    @ApiModelProperty("商品名称")
    private String productName;

    @TableField("category_id")
    @ApiModelProperty("类目ID")
    private Long categoryId;

    @TableField("product_category")
    @ApiModelProperty("商品类目")
    private String productCategory;

    @TableField("product_quantity")
    @ApiModelProperty("商品数量")
    private Integer productQuantity;

    @TableField("product_specification")
    @ApiModelProperty("商品规格")
    private String productSpecification;

    @TableField("product_style")
    @ApiModelProperty("商品款式")
    private String productStyle;

    @TableField("order_coupon_num")
    @ApiModelProperty("订单券码")
    private Integer orderCouponNum;

    @TableField("order_coupon_status")
    @ApiModelProperty("订单券码状态 0: 待核销 1:已核销 2:失效(失效 = 客户取消订单或者退款之后设置为失效)")
    private Integer orderCouponStatus;

    @TableField("is_flag")
    @ApiModelProperty("删除标志 0:未删除 1:已删除")
    private Integer isFlag;

    @TableField("remark")
    @ApiModelProperty("备注")
    private String remark;

}
